package com.hongxun.design.activitys;

import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import com.hongxun.design.R;
import com.hongxun.design.adapters.AppSettingsAdapter;
import com.hongxun.design.bean.SettingItemBean;
import com.hongxun.design.interfaces.HeadSecond;
import com.hongxun.design.listeners.ListenerSet;
import com.hongxun.design.mytools.IconSourse;
import com.hongxun.design.ui.headandbottonpanel.HeadSecondControlPanel;
import com.hongxun.design.utils.DataUtil;

import java.util.List;

/**
 * Created by zerdoor_pc on 2016/7/12.
 */
public class AppSettingsActivity extends BaseActivity implements HeadSecond {
    ListView set_list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_appsettings);
        findBar();
        findView();
    }

    @Override
    public void findBar() {
        HeadSecondControlPanel headsecond_layout = (HeadSecondControlPanel) findViewById(R.id.appsettings_layout);
        headsecond_layout.initHeadPanel(DataUtil.getsecondbean("", View.INVISIBLE, R.color.bar_right, ListenerSet.back, "应用设置", R.color.title, View.VISIBLE, IconSourse.BACK + "", View.VISIBLE));
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void findView() {
        super.findView();
        List<SettingItemBean> data= DataUtil.getSettingsData();
        set_list = (ListView) findViewById(R.id.appsettings_list);
        AppSettingsAdapter adapter=new AppSettingsAdapter(this,data);
        set_list.setAdapter(adapter);
    }
}
